package com.imau.controller;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "BusServlet", value = "/BusServlet")
public class BusServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        this.doPost(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        System.out.println("欢迎使用系统!~!");


//        //1.判断权限
//        HttpSession session = request.getSession();
//        Object user = session.getAttribute("user");
//
//        if(user!=null)
//
//        {
//            System.out.println("欢迎使用系统!~!"+session.getAttribute("user"));
//        }else {
//
//
//            System.out.println("请先登录!!");
//            response.sendRedirect(request.getContextPath()+"/index.jsp");
//        }

    }
}
